
import {createRouter, createWebHashHistory } from 'vue-router'

import login from '../components/login.vue'
import home from '../components/home.vue'

let router = createRouter({
    history: createWebHashHistory(),
    routes:[
        {
            path:"/",
            redirect:"/login"
        },
        {
            path:"/login",
            components:{
                //default 全局唯一的没有名字的 router-view
                default: login
            }
        },
        {
            path:"/home",
            component:home
        }
    ]
});


export default router;